
#include "gui_menu.h"
#include <algorithm>

using namespace WtfEngine;
using namespace WtfGui;
using namespace WtfGui::Widgets;

bool Menu::OnKeyPress(int key, int flags) {
	switch (key) {
		case InputKey::DOWN: // Next menu item
			NextChild<Button>();
			return true;
		case InputKey::UP:	// Previous menu item
			PreviousChild<Button>();
			return true;
		default:
			return WidgetContainer::OnKeyPress(key, flags);
	};
};


